home *** CD-ROM | disk | FTP | other *** search
/ Shareware Gold 2 / Shareware Gold II - Volume 2 Number 1 - Wayzata Technology (7071) (1991).iso / business / flowdraw / library.bat < prev    next >
DOS Batch File  |  1989-11-11  |  3KB  |  94 lines

  1. @ECHO OFF
  2. GOTO EDIT
  3. REM
  4. REM ***************
  5. REM * LIBRARY.BAT *
  6. REM ***************
  7. REM
  8. REM This batch file creates a new library or adds symbols to an existing library
  9. REM The format for using this batch file is LIBRARY LIBNAME SYMBOL1 SYMBOL2 ...
  10. REM     where LIBNAME is the name of the library without the .LIB extension
  11. REM     and SYMBOL1 SYMBOL2 ... are the names of up to 8 symbol files without
  12. REM     the .SYM extension
  13. REM Example:
  14. REM LIBRARY MEDIA TV RADIO NEWSPAPR
  15. REM     This command would create a library called MEDIA.LIB which would
  16. REM     contain the symbols TV.SYM, RADIO.SYM, and NEWSPAPR.SYM.  If the library
  17. REM     already exists, this command would add the symbols to the library.
  18. REM
  19. :EDIT
  20. IF %1.LIB==.LIB GOTO ERROR1
  21. IF %2.SYM==.SYM GOTO ERROR1
  22. IF NOT EXIST %2.SYM GOTO ERROR2
  23. ECHO Starting library maintenance for %1.LIB
  24. IF EXIST %1.LIB GOTO HAVELIB
  25. ECHO We are creating a new library called %1.LIB
  26. ECHO We will start the library with the following symbol files:
  27. GOTO SYMBOL1
  28. :HAVELIB
  29. ECHO We will add the following symbol files to the library %1.LIB
  30. :SYMBOL1
  31. ECHO %2.SYM
  32. :SYMBOL2
  33. IF NOT EXIST %3.SYM ECHO *** %3.SYM not found ***
  34. IF NOT EXIST %3.SYM GOTO SYMBOL3
  35. ECHO %3.SYM
  36. :SYMBOL3
  37. IF NOT EXIST %4.SYM ECHO *** %4.SYM not found ***
  38. IF NOT EXIST %4.SYM GOTO SYMBOL4
  39. ECHO %4.SYM
  40. :SYMBOL4
  41. IF NOT EXIST %5.SYM ECHO *** %5.SYM not found ***
  42. IF NOT EXIST %5.SYM GOTO SYMBOL5
  43. ECHO %5.SYM
  44. :SYMBOL5
  45. IF NOT EXIST %6.SYM ECHO *** %6.SYM not found ***
  46. IF NOT EXIST %6.SYM GOTO SYMBOL6
  47. ECHO %6.SYM
  48. :SYMBOL6
  49. IF NOT EXIST %7.SYM ECHO *** %7.SYM not found ***
  50. IF NOT EXIST %7.SYM GOTO SYMBOL7
  51. ECHO %7.SYM
  52. :SYMBOL7
  53. IF NOT EXIST %8.SYM ECHO *** %8.SYM not found ***
  54. IF NOT EXIST %8.SYM GOTO SYMBOL8
  55. ECHO %8.SYM
  56. :SYMBOL8
  57. IF NOT EXIST %9.SYM ECHO *** %9.SYM not found ***
  58. IF NOT EXIST %9.SYM GOTO ENDSYMS
  59. ECHO %9.SYM
  60. :ENDSYMS
  61. @ECHO ON
  62. PAUSE Is this correct? Press any key to continue, Ctrl-Break to quit.
  63. @ECHO OFF
  64. ECHO We are adding symbols to library %1.LIB
  65. IF EXIST %1.LIB GOTO OLDLIB
  66. COPY %2.SYM/B+%3.SYM+%4.SYM+%5.SYM+%6.SYM+%7.SYM+%8.SYM+%9.SYM %1.LIB/B
  67. GOTO END
  68. :OLDLIB
  69. COPY %1.LIB/B+%2.SYM+%3.SYM+%4.SYM+%5.SYM+%6.SYM+%7.SYM+%8.SYM+%9.SYM 
  70. GOTO END
  71. :ERROR1
  72. ECHO We cannot process your LIBRARY command.
  73. ECHO You may be using LIBRARY with the incorrect format.
  74. ECHO The correct format for using LIBRARY is -
  75. ECHO   +------------------------------------------------------+
  76. ECHO   : LIBRARY library-name symbol-name-1 symbol-name-2 ... :
  77. ECHO   +------------------------------------------------------+
  78. ECHO where 
  79. ECHO     library-name is the file name of the library without the
  80. ECHO     .LIB extension 
  81. ECHO and
  82. ECHO     symbol-name-1 symbol-name-2 ... 
  83. ECHO     are 1 to 8 file names for symbol files without the .SYM extension.
  84. GOTO FINI
  85. :ERROR2
  86. ECHO We cannot process your LIBRARY command.
  87. ECHO The 1st symbol file %2.SYM cannot be found.
  88. ECHO Please check the directory for the correct file name.
  89. GOTO FINI
  90. :END
  91. ECHO Library maintenance completed for library %1.LIB
  92. :FINI
  93. 
  94.